<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib prefix="s" uri="/struts-tags" %>

<div>
	<div class='panel op'>
		<div class='panel-title'>修改方式</div>
		<div class='panel-content' style='padding:0;'>
		<table style='margin:0;border:none;'>
			<tr>
				<td style='width:10px;'>
					<input name='op' type='radio' checked='checked' value='1'/>
				</td>
				<td class='label strong'>替换关键字：</td>
				<td><input name='from'/>替换为<input name='to'/></td></tr>
			<tr>
				<td><input name='op' type='radio' value="2"/></td>
				<td class='label'>删除关键字：</td>
				<td><input name='delete-keyword'/></td>
			</tr>
			<tr><td><input name='op' type='radio' value='3'/></td><td class='label'>加前缀：</td><td><input name='prefix'/></td></tr>
			<tr><td><input name='op' type='radio' value='4'/></td><td class='label'>加后缀：</td><td><input name='suffix'/></td></tr>
			<tr><td><input name='op' type='radio' value='5'/></td><td class='label'>删除标题中所有空格</td><td></td></tr>
		</table>
		</div>
	</div>
	<div class='panel scope' style='margin-top:20px'>
		<div class='panel-title'>修改范围</div>
		<div class='panel-content'>
			<div><input name='scope' type='radio' value='1' checked='checked'/>全部宝贝</div>
			<div><input name='scope' type='radio' value='2'/>类别</div>
			<div name="sellerCids" class='categories-selector border hide'
				style='padding: 10px; margin: 10px 0;'>
				<!-- option value=''>所有分类</option -->
				<s:iterator value="categories">
					<div value='<s:property value="cid"/>'
						parent='<s:property value="parentCid"/>'
						style=<s:if test="%{parentCid != 0}">'margin-left:20px;'</s:if>
						<s:else>'margin-left:10px;'</s:else>>
						<s:if test="%{parentCid != 0}">└</s:if>
						<input type='checkbox'
							<s:if test='checked'>checked='checked'</s:if>></input>
						<s:property value="name" />
					</div>
				</s:iterator>
			</div>
			<div>
				<input name='scope' type='radio' value='3' />手动选取
			</div>
			<div class='items-selector border hide'
				value='<s:property value="scope.items"/>'>
				<button class='add-item'>添加宝贝</button><button class='clear-items'>清空</button>
				<div class='selected-items border'>
					<table></table>
				</div>
			</div>
		</div>
	</div>
	<div style='margin-top:15px;'>
		<button class='batch-update'>开始执行</button>
		<span class='msg hide'></span>
	</div>
</div>
<div id='add-items-dialog' title='添加宝贝'>
	<s:include value="items-selector.jsp"></s:include>
</div>
<script type="text/javascript" src="js/batch-change.js"></script>